package springMvc;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/ic")
public class InputController extends BaseController{

    @RequestMapping("/test05")
    public String test0sdfsdf(){
        return prefix+"/test05"+suffix;
    }

    @RequestMapping("/getUser01")
    public void getUser2020(HttpServletRequest req){
        String lName = req.getParameter("loginName");
        String pwd = req.getParameter("password");

        System.out.println("用户名:"+lName+",密码:"+pwd);
    }
    @RequestMapping("/getUser02")
    public void getUser02(User u){
        System.out.println("用户名:"+u.getLoginName()+",密码:"+u.getPassword());
    }

    @RequestMapping("/getUser03/{id}")
    public void getUser03(User u, @PathVariable(value = "id") int idInt){
        System.out.println("id="+idInt+",登录名称:"+u.getLoginName());

    }
}
